package br.edu.fateczl.view;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;

import javax.swing.JPanel;

public class GUIFundo extends JPanel {

	private static final long serialVersionUID = 6020631523971511739L;
	private Image imagem;

	public GUIFundo() {
		imagem = new BufferedImage(50, 50, BufferedImage.TYPE_INT_RGB);
		int width = 0;
		int height = 0;
		new Dimension(width = (int) Toolkit.getDefaultToolkit().getScreenSize()
				.getWidth(), height = (int) Toolkit.getDefaultToolkit()
				.getScreenSize().getHeight());
		this.setSize(width, height);
	}

	public void paintComponent(Graphics g) {
		super.paintComponents(g);
		g.drawImage(imagem, 0, 0, getWidth(), getHeight(), null);

	}

	public void setImagem(Image imagem) {
		this.imagem = imagem;
	}

	public Image getImagem() {
		return imagem;
	}
}